![]() |
KCGetData |
||||
Header: | Keychain.h | Carbon status: | Under Evaluation | |
Retrieves the data stored in a keychain item.
OSStatus KCGetData ( KCItemRef item, UInt32 maxLength, void *data, UInt32 *actualLength );
A reference to the keychain item whose data you wish to retrieve.
The length of the data buffer pointed to by the data parameter.
A pointer to a buffer which will hold the returned data. Before calling KCGetData, allocate enough memory for the buffer to hold the data you want to store. You cannot pass NULL for this parameter.
On return, a pointer to the actual length of the data being retrieved. If the buffer pointed to by data is smaller than the actual length of the data, KCGetData returns the result code errKCBufferTooSmall. In this case, your application must allocate a new buffer of sufficient size before calling KCGetData again.
A result code. The result code errKCInvalidItemRef indicates that the specified keychain item reference was invalid. The result code errKCBufferTooSmall indicates that your application must allocate a new buffer of sufficient size before calling KCGetData again. The result code errKCDataNotModifiable indicates that the data is not available for this item.
You cannot call the KCGetData function for a private key.
Available beginning with Keychain Manager 1.0.
Under evaluation for Carbon. Available in CarbonLib 1.0 and later when KeychainLib 1.0 or later is installed. Exported by CarbonLib 1.0 and later and by KeychainLib 1.0 and later.
© 2000 Apple Computer, Inc. — (Last Updated 4/14/2000)